<%-- 
    Document   : ListUsers
    Created on : Oct 18, 2011, 10:47:52 PM
    Author     : Tunp
--%>

<%@ include file="/WEB-INF/jsp/include.jsp" %> 
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Users list</title>
    </head>
    <body>
        <h1>Users:</h1>
        <form:form method="POST" >
        <select name="search_col">
                <option value="Username">Username</option>
                <option value="Name">Name</option>
                <option value="Status">Status</option>
                <option value="Merchant">Merchant name</option>
        </select>
        <input type="text" id="search" name="search_text" maxlength="100"/>
        <input type="submit" value="Search"></input>
        <table style="border: solid chocolate">
            <tr>
                <th>
                    <b>Id </b>
                </th>
                <th>
                    <b>Username </b>
                </th>
                <th>
                    <b>Full Name</b>
                </th>
                <th>
                    <b>Gender</b>
                </th>
                <th>
                    <b>Status</b>
                </th>
                <th></th>
                <th></th>
            </tr>
            <c:forEach var="user" items="${lstUs}" >
                <tr>
                    <td>
                        <c:out value="${user.userId}"></c:out>
                    </td>
                    <td>
                        <c:out value="${user.username}"></c:out>
                    </td>
                    <td>
                        <c:out value="${user.name}"></c:out>
                    </td>
                    <td>
                        <c:out value="${user.gender}"></c:out>
                    </td>
                    <td>
                        <c:out value="${user.userstatus.status}"></c:out>
                    </td>
                    <td>
                        <a href="userlist.htm?userId=${user.userId}"><b> Detail </b> </a>
                        
                    </td>
                    <td>
                        <a href="updateuser.htm?userId=${user.userId}"><b> Update </b> </a>
                        
                    </td>
                </tr>
                </option>
            </c:forEach>
                <tr>
                    <td colspan="5">
                        <a href="adduser.htm"><b> Create new user </b> </a>
                    </td>
                </tr>
        </table>
        <a href="index.htm"><b> Back to index </b> </a>
        </form:form>
    </body>
</html>
